package org.chnxi.study.datastructrues.tree;

/**
 * 使用赫夫曼编码对文件进行压缩与解压
 */
public class HuffmanZipFileDemo {

    public static void main(String[] args) {

        //定义源文件、压缩后文件、解压后文件路径
        String srcFile = "/Users/admin/IdeaProjects/DataStructures/src/main/resources/1.docx";
        String zipFile = "/Users/admin/IdeaProjects/DataStructures/src/main/resources/1.zip";
        String unzipFile = "/Users/admin/IdeaProjects/DataStructures/src/main/resources/2.docx";

        //对源文件进行压缩
        HuffmanZipFile.zipFile(srcFile, zipFile);

        //对压缩文件进行解压
        HuffmanZipFile.unzipFile(zipFile , unzipFile);

    }

}
